import request from '@/utils/request'

export const getEmpolyeeApi = (params) => request.get('/sys/user', { params })

export const exportEmployee = () => request.get('/sys/user/export', {
  responseType: 'blob'
})

export const getExportTemplateApi = () => request.get('/sys/user/import/template', {
  responseType: 'blob'
})

export const uploadExcelApi = (data) => request.post('/sys/user/import', data)

export const delemployeeApi = (id) => request.delete(`/sys/user/${id}`)

export const addEmployeeApi = (data) => request.post('/sys/user', data)

export const getEmployeeDetailApi = (id) => request.get(`/sys/user/${id}`)

export const changeEmployeeApi = (data) => request.put(`/sys/user/${data.id}`, data)

export const sendMultiMessageAPI = data => request.post('/sys/messageMuch', data)

// 获取用户消息
export const getUserMessageAPI = () => request.get('/sys/message')
// 删除用户信息
export const delUserMessageAPI = id => request.delete(`/sys/message/${id}`)
// 已读消息
export const updateUserMessageAPI = id => request.put(`/sys/message/${id}`)
